import unittest
import os
from BeautifulReport import BeautifulReport

with open(report_file, "wb") as fl:
    module_path = "./"
    # discover = unittest.defaultTestLoader.discover(start_dir=module_path, pattern="MyTestCase*.py")
    # runner = HTMLTestRunner(title='测试标题', description='描述本次测试的大概内容', stream=fl)
    # runner.run(discover)

    discover = unittest.defaultTestLoader.discover(start_dir=module_path, pattern="MyTestCase*.py")
    BeautifulReport(discover).report(description="tester", report_dir=report_dir, filename="can_report",
                                     theme="theme_candy")
    """
    report_dir: 生成report的文件存储路径
    filename: 生成文件的filename
    description: 生成文件的注释
    theme: 报告主题名
    theme_default,theme_cyan,theme_candy,theme_memories
    """
